package com.me.study.async;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * 
 *
 * @author ME
 * @date   2019/12/25
 */
@Service
public class AsyncService {

	/**
	 * Async("asyncPool1") 可以指定执行任务的线程池
	 */
	@Async("asyncPool1")
	public void find() {
		System.out.println("【Spring】 Async(异步执行): 当前线程为 " + Thread.currentThread().getName());
	}
}
